 <ion-view view-title="公司信息" show-tabs>
	<ion-nav-buttons side="right">
    	<button class="button" ng-class="{'button-icon ion-ios-compose-outline':!$root.isEdit,'button-clear':$root.isEdit}" ng-click="$root.toggleEdit();comForm.reset();"><span ng-if="$root.isEdit">取消</span></button>
	</ion-nav-buttons>
    <ion-content class="wrap-light">
	    <form name="comForm" ng-submit="$root.toggleEdit();update();" novalidate class="wrap-light2">
			<ion-list>
				<ion-item class="margin-top-large item-divider">
				    公司信息
				</ion-item>
				<ion-item class="item-base item-icon-left">
				    <i class="icon ion-ios-home-outline dark2"></i>
				    <span>{{company.name}}</span>
				</ion-item>
				<ion-item class="item-input item-icon-left">
				    <i class="icon ion-ios-telephone-outline dark2"></i>
				    <input type="text" name="tel" ng-maxlength="20" required placeholder="座机号码，例如：0755-86565252" ng-readonly="!$root.isEdit" ng-model="company.tel" auto-focus ng-pattern="'\\d{3,5}-\\d{6,9}'" />
				    <span class="ion-minus-circled" ng-show="comForm.tel.$dirty && comForm.tel.$invalid "></span>
				</ion-item>

				<ion-item class="item-input item-icon-left" ng-if="$root.isEdit">
				    <i class="icon ion-ios-location-outline dark2"></i>
				    <input type="text" name="province" maxlength="50" required placeholder="省" ng-model="company.address.province" />
				    <input type="text" name="city" maxlength="50" required placeholder="市" ng-model="company.address.city" />
				    <input type="text" name="region" maxlength="50" required placeholder="区" ng-model="company.address.region" />
				</ion-item>
				<ion-item class="item-input item-icon-left" ng-if="$root.isEdit">
				    <input type="text" name="street" maxlength="50" required placeholder="详细地址" ng-model="company.address.street" />
				    <!-- <span class="ion-minus-circled" ng-show="comForm.address.$dirty && comForm.address.$invalid "></span> -->
				    <!-- <i class="icon ion-android-locate dark2"></i> -->
				</ion-item>

				<ion-item class="item-base item-icon-left item-icon-right" ng-if="!$root.isEdit">
				    <i class="icon ion-ios-location-outline dark2"></i>
				    <p><span>{{company.address.province}}</span><span>{{company.address.city}}</span><span>{{company.address.region}}</span><span>{{company.address.street}}</span></p>
				    <!-- <i class="icon ion-android-locate dark2"></i> -->
				</ion-item>

				<button type="submit" class="button button-block button-balanced" ng-if="$root.isEdit">保存</button>
				<a href="#/home" class="button button-light button-block" ng-if="isFirstLogin">跳过</a>

				<ion-item class="margin-top-large item-divider">
				    软件授权
				</ion-item>

				<ion-item class="">
				    <span class="input-label">启用时间</span>
				    <span ng-bind="company.enabled_time"></span>
				</ion-item>
				<ion-item class="">
				    <span class="input-label">到期时间</span>
				    <span ng-bind="company.expiration"></span>
				    <span ng-bind="company.remaining" class="pull-right"></span>
				    <!-- <span >续费 TODO</span> -->
				</ion-item>
				<ion-item class="">
				    <span class="input-label">用户数量</span>
				    <span ng-bind="company.users_num"></span>
				    <!-- <span >扩充 TODO</span> -->
				</ion-item>
			</ion-list>
		</form>
	</ion-content>
</ion-view>
